package com.eco
{
	import com.eco.*;
	import com.framework.*;
	
	import flash.display.MovieClip;
	import flash.events.*;
	import flash.utils.*;
	
	//超级护甲道具，让卫士进入霸体状态，不会有硬直
	public class BonusSuperArmor extends Bonus
	{
		private var iSuperArmor:int;
		
		public function BonusSuperArmor()
		{
			super( 8, Bonus.BONUS_SUPERARMOR);
			
			iFunctionTime = 5000;//5秒
		}
		
		override public function StartFunction():void
		{
			if( ftFighter == null )
				return;
			
			CreateSoundEvent( CustomEventSound.PLAY_SOUND, SoundInfo.EFF_BONUS_SUPERARMOR_ACTIVE);
			
			//自己的变量用于保存当前情况下的卫士的状态，用于以后的还原
			iSuperArmor = ftFighter.iSuperArmor;
			
			ftFighter.iSuperArmor = 999;//霸体值变成999(相当于无限大)，不会有硬直时间了
			super.StartFunction();
		}
		
		override public function StopFunction():void
		{
			ftFighter.iSuperArmor = iSuperArmor;
			
			super.StopFunction();
		}
	}
}